package com.qianfeng.openapi.web.master.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.qianfeng.openapi.web.master.dto.TableData;
import com.qianfeng.openapi.web.master.dto.TableParam;
import com.qianfeng.openapi.web.master.entity.AppInfo;
import com.qianfeng.openapi.web.master.service.AppInfoService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description:应用信息
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/12/30
 * @Time: 下午10:38
 */
@RestController
public class AppInfoController {

    @Resource
    private AppInfoService appInfoService;


    @RequestMapping("/appInfo/list")
    public TableData gatewayTableList(TableParam param){

        return  appInfoService.appInfoTableList(param);
    }



    @RequestMapping(value = "/appinfo/del")
    public  R deleteGateway(@RequestBody List<Integer> ids){
        return  appInfoService.batchDelete(ids);
    }


    @RequestMapping("/appinfo/info")
    public  R  apiMappingInfo(int id){
        return  appInfoService.appInfo(id);
    }

    /**
     * 修改
     * @param appInfo
     * @return
     */
    @RequestMapping("/appinfo/update")
    public   R  update(@RequestBody AppInfo appInfo){

        return  appInfoService.updateAppInfo(appInfo);
    }



}
